package cn.school.test;

import cn.school.dao.StudentDao;
import cn.school.entity.Student;
import cn.school.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * @author oldliu
 * @since 1.0
 */
public class SearchOneStu {
    public static void main(String[] args) {
        SqlSession s= MyBatisUtil.get();
        StudentDao mapper = s.getMapper(StudentDao.class);
        Student student = mapper.get(1L);
        System.out.println("基本信息："+student);
        System.out.println("年级名称："+student.getGname());
        //gradeDao.get(student.getGradeid())
        System.out.println();
        MyBatisUtil.close(s);
    }
}
